package cn.vcjf.weapp.api.user.service;

import cn.vcjf.weapp.api.user.entity.UserProfit;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zhengzihang
 * @since 2018-09-25
 */
public interface UserProfitService extends IService<UserProfit> {

	List<UserProfit> selectIndirectSubordinates(Page<UserProfit> page, UserProfit userProfit);

	List<UserProfit> selectUserProfitPage(Page<UserProfit> page, UserProfit userProfit);

	int addUserProfit(UserProfit userProfit);

	@Transactional(rollbackFor = Exception.class)
	int calculateUserProfit(UserProfit userProfit);
}
